@font-face {
  font-family: "icons-turn-arrow";
  src: url("../fonts/icons/turn-arrow.eot") format("embedded-opentype"), 
    url("../fonts/icons/turn-arrow.woff") format("woff"), 
    url("../fonts/icons/turn-arrow.ttf") format("truetype"), 
    url("../fonts/icons/turn-arrow.svg") format("svg");
}

/* style */
html, body {
  width: 100%;
  height: 100%;
  background-color: #222;
}

/* container */
.container {
  width: 100%;
  height: 100%;
}

/* stage */
.stage {
  position: relative;
  width: 100%;
  height: 100%;
}

/* img-sec */
.img-sec {
  position: relative;

  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #ddd;
  perspective: 1800px; // 增强3d效果感，距离越小效果越明显

  @at-root{
    .img-figure {
      position: absolute;
      width: 320px;
      height: 360px;
      margin: 0;
      padding: 40px;
      background-color: #fff;
      box-sizing: border-box;
      cursor: pointer;
      
      transform-origin: 0 50% 0; // 更改变形的原点位置 (0,50%,0)
      transform-style: preserve-3d; // 子元素将保留3d位置
      transition: left .6s ease-in-out, top .6s ease-in-out, transform .6s ease-in-out;
      &.is-inverse {
        transform: translate(320px) rotateY(180deg);
      }
    }

    figcaption {
      text-align: center;

      .img-title {
        margin: 20px 0 0 0;

        color: #a7a0a2;
        font-size: 16px;
      }

      .img-back {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        padding: 50px 40px;
        overflow: auto;
        color: #a7a0a2;
        font-size: 22px;
        line-height: 1.5;
        text-align: center;
        background-color: #FFF;
        box-sizing: border-box;
        transform: rotateY(180deg) translateZ(1px); // 旋转180
        backface-visibility: hidden; // 旋转到背面隐藏

        p {
          margin: 0;
        }
      }
    }
  }
}

/* controller */
.controller-nav {
  position: absolute;
  left: 0;
  bottom: 30px;
  width: 100%;
  z-index: 101;
  text-align: center;
  
  @at-root{
    .controller-unit {
      display: inline-block;
      margin: 0 5px;
      width: 30px;
      height: 30px;
      border-radius: 50%;

      text-align: center;
      vertical-align: middle;
      cursor: pointer;
      background-color: #aaa;
      transform: scale(.5); // 默认缩放0.5
      transition: transform 0.6s ease-in-out, background-color 0.6s ease;

      
      &.is-center {
        background-color: #888;
        transform: scale(1); // 恢复1

        &::after {
          color: #fff;
          font-family: "icons-turn-arrow";
          font-size: 80%;
          line-height: 2.25;
          content: "\e600";
          
          // 底色深 物色浅
          -webkit-font-smoothing: antialiased; // 开启Chrome灰阶渲染平滑
          -moz-osx-font-smoothing: grayscale; // 开启mac灰阶渲染平滑
        }

        &.icon-inverse {
          background-color: #555;
          transform: rotateY(180deg);
        }
      }
    }
  }
}